package com.example.demo.Command1;

import java.util.ArrayList;
import java.util.List;

public class Waiter {

    private List<Command> commandList = new ArrayList<>();

    void addCommand(Command command){
        commandList.add(command);
    }

    void removeCommand(Command command){
        if(commandList.contains(command)){
            commandList.remove(command);
        }
    }
    
    void executeMenu(){
        for (Command command : commandList) {
            command.execute();
        }
    }

}
